package com.party.admin.web.dto.output.enterpriseservice;
import com.party.core.model.enterpriseservice.EpService;
import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;
import java.util.Date;

/**
 * @program: party
 * @description: 服务列表输出
 * @author: Hua Qunhao
 * @create: 2019-01-09 14:20
 */
public class EpServiceOutput {

    private String id;
    // 标题
    private String title;

    // 副标题
    private String subTitle;

    // 封面图
    private String pic;

    // 内容
    private String content;

    // 排序
    private Integer sort;


    private String qrCodeUrl;

    private Date createDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

    public void setQrCodeUrl(String qrCodeUrl) {
        this.qrCodeUrl = qrCodeUrl;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public static EpServiceOutput transform(EpService epService) {
        EpServiceOutput output = new EpServiceOutput();
        try {
            BeanUtils.copyProperties(output, epService);
        } catch (IllegalAccessException | InvocationTargetException e) {
            e.printStackTrace();
        }
        return output;
    }
}
